package com.woniu.liuzhougov.itemQueryAndNotice.service;

import com.woniu.liuzhougov.authorityControl.dao.UserMapper;
import com.woniu.liuzhougov.authorityControl.pojo.User;
import com.woniu.liuzhougov.itemAndTask.pojo.*;
import com.woniu.liuzhougov.itemQueryAndNotice.mapper.SxMapper;
import com.woniu.liuzhougov.itemQueryAndNotice.vo.AreaStatistic;
import com.woniu.liuzhougov.itemQueryAndNotice.vo.DepartmentStatistic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class SxService implements SxMapper, UserMapper {

    @Autowired
    private  SxMapper sxMapper;

    @Autowired
    public  UserMapper userMapper;

    @Override
    public List<User> findFounder() {
        List<User> founder = sxMapper.findFounder();
        return founder;
    }

    @Override
    public User findUserById(Integer item_founder_id) {
        User userById = sxMapper.findUserById(item_founder_id);
        return userById;
    }

    @Override
    public ItemType findTypeById(Integer item_type_id) {
        ItemType typeById = sxMapper.findTypeById(item_type_id);
        return typeById;
    }

    @Override
    public Urgenry findUrgencyById(Integer urgenry_id) {
        Urgenry urgencyById = sxMapper.findUrgencyById(urgenry_id);
        return urgencyById;
    }

    @Override
    public CheckStatus findCheckStatusById(Integer check_status_id) {
        CheckStatus checkStatusById = sxMapper.findCheckStatusById(check_status_id);
        return checkStatusById;
    }

    @Override
    public Area findAreaById(Integer area_id) {
        Area areaById = sxMapper.findAreaById(area_id);
        return areaById;
    }

    @Override
    public List<Urgenry> findUrgenry() {
        List<Urgenry> urgency = sxMapper.findUrgenry();
        return urgency;
    }

    @Override
    public List<CheckStatus> findStatue() {
        List<CheckStatus> statue = sxMapper.findStatue();
        return statue;
    }

    @Override
    public List<Item> queryItems(CheckStatus checkStatus, User user, Urgenry urgency, Item item) {
        List<Item> items = sxMapper.queryItems(checkStatus,user, urgency,item);
        return items;
    }

    @Override
    public List<Item> cityQueryItems(CheckStatus checkStatus, User user, Urgenry urgency, Item item) {
        List<Item> cityItems = sxMapper.cityQueryItems(checkStatus, user, urgency, item);
        return cityItems;
    }

    @Override
    public List<AreaStatistic> queryCountByArea() {
        List<AreaStatistic> areaStatistics = sxMapper.queryCountByArea();
        return areaStatistics;
    }

    @Override
    public List<DepartmentStatistic> queryCountByDepartment() {
        List<DepartmentStatistic> departmentItemCount = sxMapper.queryCountByDepartment();
        return departmentItemCount;
    }

    @Override
    public int deleteByPrimaryKey(Integer userId) {
        return 0;
    }

    @Override
    public int insert(User record) {
        return 0;
    }

    @Override
    public int insertSelective(User record) {
        return 0;
    }

    @Override
    public User selectByPrimaryKey(Integer userId) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return 0;
    }

    @Override
    public User getUserByLoginName(String userLoginName) {
        return null;
    }

    @Override
    public Integer getUserIdByUserName(String addItemFounder) {
        return null;
    }

    @Override
    public List<User> listUser(User user, Integer currentPage, Integer pageSize) {
        return null;
    }

    @Override
    public int updateDepartmentByUserId(User user) {
        return 0;
    }

    @Override
    public int updateUserStatusByUserId(User user) {
        return 0;
    }

    @Override
    public User getUserDetailByUserId(Integer userId) {
        return null;
    }

    @Override
    public int countLoginNameNumber(User user) {
        return 0;
    }

    @Override
    public int updateUserDetailsByUserId(User user) {
        return 0;
    }

    @Override
    public List<User> listUserByDepartmentId(Integer departmentId) {
        List<User> users = userMapper.listUserByDepartmentId(departmentId);
        return users;
    }

    @Override
    public int countRecordByDepartmentId(Integer departmentId) {
        return 0;
    }
}
